/*
 * Copyright：fxsen <br/>
 * Date: 2021/12/21 9:57 <br/>
 * Author: <a href="mailto:fxsen@foxmail.com">fxsen</a>
 */
package com.fxsen.commons.sysmanager.core.mapper;

import com.fxsen.commons.core.base.common.mapper.CommonMapper;
import com.fxsen.commons.sysmanager.core.entity.SsoConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @describe: 单点登录配置数据访问层 <br/>
 * @date: 2021/12/21 9:57 <br/>
 * @author: <a href="mailto:fxsen@foxmail.com">fxsen</a>
 */
@Mapper
@Repository
public interface SsoMapper extends CommonMapper<SsoConfig> {
    /**
    * 通过客户端id查询
    * @param clientId 客户端id
    * @return {@link SsoConfig}
    * @date 2021/12/21 10:03
    * @author <a href="mailto:fxsen@foxmail.com">fxsen</a> <br/>
    * @version 1.0.0 <br/>
    **/
    @Select("select * from sys_sso_config where status = 0 and delete_logic = 0 and client_id = #{clientId}")
    SsoConfig selectByClientId(String clientId);
}
